<!--
  Generated template for the ManagergoodsPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-navbar>
    <ion-buttons start *ngIf='isNotFromOrder'>
      <button ion-button (click)="dismissCLI()">
        <img src="assets/img/back.png" width='15' height='20'>
      </button>
    </ion-buttons>
    <ion-title>管理收货地址</ion-title>
    <ion-buttons end style="text-align: right;">
      <button ion-button (click)="addAddressCLI()">新增</button>
    </ion-buttons>
  </ion-navbar>
</ion-header>


<ion-content padding>
  <div *ngIf="!blank">
    <ion-card  *ngFor="let item of addresslist, let i = index" >
      <ion-item>
        <h3 style="line-height:2rem;">
          <span>{{item.consignee}}</span>
          <span>{{item.consignee_phone}}</span>
        </h3>
      </ion-item>
      <ion-card-content>
        <p>{{item.consignee_address}}{{item.detail_address}}</p>
      </ion-card-content>
      <ion-row>
        <ion-col>
          <button ion-button icon-left clear small (click)="editDefaultAddressAPI(item)">
              <!-- <ion-checkbox color="danger" checked="true" *ngIf="item.default_address ==1"></ion-checkbox>
              <ion-checkbox color="danger" *ngIf="item.default_address !=1"></ion-checkbox> -->
              <img src="assets/img/selectok.png" *ngIf="item.default_address ==1"/>
              <img src="assets/img/selectno.png" *ngIf="item.default_address !=1"/>
            <div>默认地址</div>
          </button>
        </ion-col>
        <ion-col>
          <button ion-button icon-left clear small (click)="goodseditCLI(item)">
            <ion-icon name="ios-create-outline"></ion-icon>
            <div>编辑</div>
          </button>
        </ion-col>
        <ion-col>
          <button ion-button icon-left clear small (click)="delAddressAPI(item)">
            <ion-icon name="trash"></ion-icon>
            <div>删除</div>
          </button>
        </ion-col>
      </ion-row>
    </ion-card>
  </div>


 <div  *ngIf="blank">
  <span class="blank">
    <img src="assets/img/Comment/tianjiadizhi@2x.png" alt="">
    还没有收获地址呦
  </span>
 </div>


</ion-content>